import pandas as pd
import matplotlib.pyplot as plt
import seaborn as sns
df = pd.read_csv("boston_housing.csv")
col = df.columns
data_corr = df.corr()
data_corr = data_corr.abs()
'''得到相关系数的绝对值，通常认为相关系数的绝对值大于0.5的特征为强相关'''
plt.subplots(1,1,figsize=(10,6))
sns.heatmap(data_corr,mask=data_corr<0.5,annot=True)
plt.axis("tight")
plt.show()